<%= form_for(@photo, url: photos_path, :html => {:class=>'form-horizontal', :multipart => true}) do |t| %>
	<fieldset>
		<legend>
    <%= link_to '图片列表', photos_path %>
    <%= link_to '文章列表', '/topics/category/1' %>
    </legend>
  <div class="control-group">
    <label class="control-label">标题</label>
    <div class="controls">
    <%= t.text_field :title, :placeholder => '文章标题' %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">分类</label>
    <div class="controls">
      <%= select_tag "photo[category]", options_from_collection_for_select(@category, 'id', 'title') %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">图片</label>
    <div class="controls">
      <%= t.file_field :image %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">状态</label>
    <div class="controls">
      <%= radio_button_tag 'photo[status]',0, true, :class => 'new' %>启用
      <%= radio_button_tag 'photo[status]',1, false, :class => 'new' %>禁用
    </div>
  </div>
  <div class="control-group">
    <div class="controls">
      <button type="submit" class="btn">新增</button>
    </div>
  </div>
</fieldset>
<% end %>
<!---->
